package com.example.wonderfulradish;

import android.content.Intent;
import android.graphics.Color;
import android.os.Build;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.MatchGame.Match_radish;
import com.example.PullGame.Pull_radish;

public class Choose_Game extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //使整个界面填充满整个屏幕
        if(Build.VERSION.SDK_INT>=21){
            View decorView=getWindow().getDecorView();
            decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_FULLSCREEN|View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
            getWindow().setStatusBarColor(Color.TRANSPARENT);
        }
        setContentView(R.layout.activity_choose__game);

        //返回首页
        Button backhome=(Button) findViewById(R.id.backhome);
        backhome.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //Intent intent=new Intent(Choose_Game.this,MainActivity.class);
                //startActivity(intent);
                finish();
            }
        });

        //跳转至拔萝卜
        Button choose_firstgame=(Button) findViewById(R.id.pull_radish);
        choose_firstgame.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(Choose_Game.this,Pull_radish.class);
                startActivity(intent);
                finish();

            }
        });
        //跳转至匹配萝卜
        Button choose_secondgame=(Button) findViewById(R.id.match_radish);
        choose_secondgame.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent=new Intent(Choose_Game.this,Match_radish.class);
                startActivity(intent);
                finish();
            }
        });
    }
}
